<?php
	require"db_connection.php";
	
	$affiliate_id = $_POST['affiliate_id'];
	
	/*-----------DELETE DATA FROM THE SELECTED TABLES ----------------*/
	$sql_drivers="DELETE
				  FROM
				   drivers
				   WHERE
				   affiliateid='$affiliate_id'";
	
	$sql_onewayrate ="DELETE
					  FROM
					   onewayrate
						WHERE
						affiliateid='$affiliate_id'";
						
	$sql_hourlyrate ="DELETE
					  FROM
					  hourlyrate
					  WHERE
					   affiliateid='$affiliate_id'";
	
	$sql_airportrate = "DELETE
						 FROM
						 airportrate
						 WHERE
						 affiliateid='$affiliate_id'";
	$sql_vehicles = "DELETE
					 FROM
					  vehicles
					  WHERE affiliateid='$affiliate_id'";
						 
	$sql_affiliate = "DELETE 
					  FROM 
					  affiliate
					  WHERE affiliateid='$affiliate_id'";
					 	
	mysql_query($sql_drivers);
	mysql_query($sql_onewayrate);
	mysql_query($sql_hourlyrate);
	mysql_query($sql_airportrate);
	mysql_query($sql_vehicles);
	mysql_query($sql_affiliate);
?>